/* 智能文档管理系统 - 原型样式 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #303133;
    line-height: 1.6;
}

/* 顶部导航栏 */
.header {
    background: #ffffff;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
    max-width: 1920px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #409EFF;
}

.logo i {
    margin-right: 8px;
    font-size: 24px;
}

/* 搜索框 */
.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
    position: relative;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 40px;
    border: 1px solid #dcdfe6;
    border-radius: 20px;
    font-size: 14px;
    background: #f5f7fa;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #409EFF;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #909399;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
}

.suggestion-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f5f7fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* 用户菜单 */
.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-icon {
    position: relative;
    color: #606266;
    cursor: pointer;
    font-size: 18px;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f56c6c;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #606266;
    cursor: pointer;
    font-size: 16px;
}

/* 主容器 */
.main-container {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: #ffffff;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    overflow-y: auto;
}

.nav-menu {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #606266;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-item:hover {
    background-color: #f5f7fa;
    color: #409EFF;
}

.nav-item.active {
    background-color: #ecf5ff;
    color: #409EFF;
    border-right: 3px solid #409EFF;
}

.nav-item i {
    margin-right: 12px;
    width: 16px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 24px;
    min-height: calc(100vh - 60px);
}

/* 页面通用样式 */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ebeef5;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #303133;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    background: #ffffff;
    color: #606266;
}

.btn:hover {
    background-color: #ecf5ff;
    border-color: #b3d8ff;
    color: #409EFF;
}

.btn-primary {
    background-color: #409EFF;
    border-color: #409EFF;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #66b1ff;
    border-color: #66b1ff;
}

.btn-outline {
    background: transparent;
    border-color: #409EFF;
    color: #409EFF;
}

.btn-outline:hover {
    background-color: #409EFF;
    color: #ffffff;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

.btn i {
    margin-right: 4px;
}

/* 快速操作按钮 */
.quick-actions {
    display: flex;
    gap: 12px;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #409EFF, #66b1ff);
}

.stat-content h3 {
    font-size: 28px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 4px;
}

.stat-content p {
    color: #909399;
    font-size: 14px;
    margin-bottom: 4px;
}

.stat-change {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 12px;
}

.stat-change.positive {
    background: #f0f9ff;
    color: #67c23a;
}

.stat-change.negative {
    background: #fef0f0;
    color: #f56c6c;
}

/* 工作台网格布局 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* 最近文档区域 */
.recent-documents,
.quick-access {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ebeef5;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
}

.section-header a {
    color: #409EFF;
    text-decoration: none;
    font-size: 14px;
}

.section-header a:hover {
    text-decoration: underline;
}

/* 文档列表 */
.document-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.document-item:hover {
    background-color: #f5f7fa;
    border-color: #409EFF;
}

.document-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #ffffff;
    font-size: 16px;
}

.document-icon.pdf { background: #f56c6c; }
.document-icon.ppt { background: #e6a23c; }
.document-icon.doc { background: #409eff; }
.document-icon.img { background: #67c23a; }

.document-info {
    flex: 1;
}

.document-title {
    font-size: 14px;
    font-weight: 500;
    color: #303133;
    margin-bottom: 4px;
    line-height: 1.4;
}

.document-meta {
    font-size: 12px;
    color: #909399;
    display: flex;
    gap: 16px;
}

.document-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.document-item:hover .document-actions {
    opacity: 1;
}

.action-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: none;
    background: #f5f7fa;
    color: #606266;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #409EFF;
    color: #ffffff;
}

/* 项目快速访问 */
.project-quick-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.project-item:hover {
    background-color: #f5f7fa;
}

.project-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
}

.project-info h4 {
    font-size: 14px;
    color: #303133;
    margin-bottom: 4px;
}

.project-info p {
    font-size: 12px;
    color: #909399;
}

/* 文档管理页面 */
.toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.view-controls {
    display: flex;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    overflow: hidden;
}

.view-btn {
    padding: 6px 12px;
    border: none;
    background: #ffffff;
    color: #606266;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    background: #f5f7fa;
}

.view-btn.active {
    background: #409EFF;
    color: #ffffff;
}

.filter-controls {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
}

/* 文档网格 */
.documents-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.document-card {
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: #ffffff;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: #409EFF;
}

.document-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.document-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #ffffff;
}

.document-card-title {
    font-size: 14px;
    font-weight: 500;
    color: #303133;
    flex: 1;
    line-height: 1.4;
}

.document-card-body {
    margin-bottom: 12px;
}

.document-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f2f5;
    color: #606266;
    font-size: 12px;
    border-radius: 12px;
}

.tag.primary { background: #ecf5ff; color: #409EFF; }
.tag.success { background: #f0f9ff; color: #67c23a; }
.tag.warning { background: #fdf6ec; color: #e6a23c; }

.document-description {
    font-size: 13px;
    color: #909399;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.document-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #c0c4cc;
    border-top: 1px solid #f0f2f5;
    padding-top: 12px;
}

/* 项目管理页面 */
.projects-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.project-card {
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.project-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.project-card-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 12px;
}

.project-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
    flex: 1;
}

.project-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f5f7fa;
    border-radius: 6px;
}

.project-stat {
    text-align: center;
}

.project-stat-number {
    font-size: 18px;
    font-weight: 600;
    color: #409EFF;
}

.project-stat-label {
    font-size: 12px;
    color: #909399;
    margin-top: 4px;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #909399;
}

/* 高级搜索页面 */
.advanced-search {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
}

.search-form {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #303133;
    margin-bottom: 8px;
}

.form-row input,
.form-row select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox-group input {
    width: auto;
    margin-right: 6px;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-range span {
    color: #909399;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.search-results {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

/* 数据统计页面 */
.analytics-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.chart-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 16px;
}

.chart-placeholder {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #c0c4cc;
    font-size: 48px;
}

.chart-placeholder p {
    font-size: 14px;
    margin-top: 16px;
}

/* 系统设置页面 */
.settings-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 16px;
    border-bottom: 1px solid #ebeef5;
    padding-bottom: 8px;
}

.setting-item {
    margin-bottom: 16px;
}

.setting-item label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #303133;
    margin-bottom: 6px;
}

.setting-item input {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(2px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-large {
    min-width: 800px;
    min-height: 600px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #ebeef5;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #c0c4cc;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #f56c6c;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #ebeef5;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #dcdfe6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #409EFF;
    background: #ecf5ff;
}

.upload-icon {
    font-size: 48px;
    color: #c0c4cc;
    margin-bottom: 16px;
}

.upload-area p {
    color: #606266;
    font-size: 14px;
}

.upload-link {
    color: #409EFF;
    cursor: pointer;
}

.upload-link:hover {
    text-decoration: underline;
}

.upload-options {
    display: grid;
    gap: 16px;
}

.upload-options label {
    font-size: 14px;
    font-weight: 500;
    color: #303133;
    margin-bottom: 6px;
    display: block;
}

.upload-options select,
.upload-options input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}

/* 预览内容 */
.preview-content {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0c4cc;
    font-size: 14px;
    background: #f5f7fa;
    border-radius: 6px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #67c23a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
    z-index: 3000;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        margin-left: 200px;
    }
    
    .sidebar {
        width: 200px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .advanced-search {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 12px;
    }
    
    .search-container {
        margin: 0 16px;
    }
    
    .sidebar {
        width: 60px;
    }
    
    .nav-item span {
        display: none;
    }
    
    .main-content {
        margin-left: 60px;
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .documents-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        min-width: 300px;
        margin: 20px;
    }
    
    .toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e4e7ed;
    border-top: 2px solid #409EFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}